//
//  MainViewController.m
//  theCoupleLive
//
//  Created by USER on 2016/12/4.
//  Copyright © 2016年 USER. All rights reserved.
//

#import "MainViewController.h"
#import "NearbyViewController.h"
#import "MessageViewController.h"
#import "LiveViewController.h"
#import "FriendViewController.h"
#import "PersonalViewController.h"

@interface MainViewController ()
@property(nonatomic,strong)NSArray *nameAry;
@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //附近
    NearbyViewController *nearbyVC=[[NearbyViewController alloc]init];
    nearbyVC.tabBarItem.title=@"附近";
    nearbyVC.tabBarItem.image=[UIImage imageNamed:@"fujin"];
    UINavigationController *nearbyNa=[[UINavigationController alloc]initWithRootViewController:nearbyVC];
    [nearbyNa.navigationBar setBarTintColor:[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1]];
    
    //消息
    MessageViewController *messageVC=[[MessageViewController alloc]init];
    messageVC.tabBarItem.title=@"消息";
    messageVC.tabBarItem.image=[UIImage imageNamed:@"xiaoxi"];
    UINavigationController *messageNa=[[UINavigationController alloc]initWithRootViewController:messageVC];
    [messageNa.navigationBar setBarTintColor:[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1]];
    
    //直播
    LiveViewController *liveVC=[[LiveViewController alloc]init];
    liveVC.tabBarItem.title=@"直播";
    liveVC.tabBarItem.image=[UIImage imageNamed:@"zhibo"];
    UINavigationController *liveNa=[[UINavigationController alloc]initWithRootViewController:liveVC];
    [liveNa.navigationBar setBarTintColor:[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1]];
    
    
    //朋友
    FriendViewController *friendVC=[[FriendViewController alloc]init];
    friendVC.tabBarItem.title=@"朋友";
    friendVC.tabBarItem.image=[UIImage imageNamed:@"pengyou"];
    UINavigationController *friendNa=[[UINavigationController alloc]initWithRootViewController:friendVC];
    [friendNa.navigationBar setBarTintColor:[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1]];
    
    //个人
    PersonalViewController *personalVC=[[PersonalViewController alloc]init];
    personalVC.tabBarItem.title=@"个人";
    personalVC.tabBarItem.image=[UIImage imageNamed:@"geren"];
    UINavigationController *personalNa=[[UINavigationController alloc]initWithRootViewController:personalVC];
    [personalNa.navigationBar setBarTintColor:[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1]];
    
    NSArray *ary=[[NSArray alloc]init];
    ary=@[nearbyNa,messageNa,liveNa,friendNa,personalNa];
    self.viewControllers=ary;
    self.tabBar.tintColor=[UIColor colorWithRed:252.0/255 green:74.0/255 blue:115.0/255 alpha:1];
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
